<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:t="http://myfaces.apache.org/tomahawk">

<ui:composition template="../templates/template.xhtml">

	<ui:define name="title">
	 	Attorney Establishment Filing Page
	</ui:define>
	<ui:param name="page" value="home" />
	<ui:define name="header">
		<ui:include src="../header.xhtml" />
	</ui:define>

	<ui:define name="menu">
		<h:form>
			<div align="center"><br />
			<br />
			<h:commandButton value="Back"
				action="#{attFilingDataAndDocumentUploadPage.back}" styleClass="buttonClass" />
			<br />
			<br />

			</div>
		</h:form>
	</ui:define>

	<ui:define name="body">

		<f:loadBundle basename="us.gaaoc.framework.webapp.util.userMessage" var="bundle" />

		<h:form id="uploadForm" enctype="multipart/form-data" method="POST">

			<!-- for look up -->
			<br />
			<div id="bodypanel" class="grouping"><h:outputLabel
				value="Prepare Filings for Attorney" styleClass="textFont200" /> <br />
			<br />
			
			<h:panelGrid width="100%" columns="3" >
			
				<f:facet name="header">
								Court Date
							</f:facet>
				<h:column> 
				<h:outputLabel  value="Court Date:" /> 
							</h:column>
				<!-- 
				<h:column>
					<h:outputText id="courtDate" value="#{attFilingDataAndDocumentUploadPage.courtDate}" />
				</h:column>
				 -->				
				<h:column>
					<t:inputCalendar id="courtDate" monthYearRowClass="yearMonthHeader"
						weekRowClass="weekHeader" currentDayCellClass="currentDayCell"
						value="#{attFilingDataAndDocumentUploadPage.courtDate}" renderAsPopup="true"
						renderPopupButtonAsImage="true" />
				</h:column>
				<h:column>
					<h:message for="courtDate" styleClass="error" />
				</h:column>

			</h:panelGrid>
			<br />
			<h:panelGrid width="100%" columns="3" styleClass="iCubed">
				<f:facet name="header">
								Document Type
							</f:facet>
				<h:column> 
								Select Document Type: 
							</h:column>
				<h:column>
					<h:selectOneMenu id="caseType" size="1"
						value="#{attFilingDataAndDocumentUploadPage.docType}"
						binding="#{attFilingDataAndDocumentUploadPage.docTypeInput}" title="#{bundle.documentDescription}">
						<f:selectItems id="selectItem"
							value="#{attFilingDataAndDocumentUploadPage.docTypeDescriptionsItems}" />
					</h:selectOneMenu>
				</h:column>
				<h:column />
				<h:column>			
								Prepare Document for Filing
							</h:column>
				<h:column>
					<t:inputFileUpload id="upload"
						value="#{attFilingDataAndDocumentUploadPage.myFile}" storage="file"
						required="true" />
				</h:column>
				<h:column />

			</h:panelGrid> <br />
			
				<h:commandButton id="uploadFile" value="UPLOAD FILE"
					action="#{attFilingDataAndDocumentUploadPage.uploadFile}"
					styleClass="buttonClass" title="#{bundle.uploadFileButton}"/>
			
				<h:message for="uploadFile" styleClass="error" />
			</div>
			<br />
		</h:form>



		<h:form>
			<h:column>
				<h:commandButton value="Review of Filing"
					action="#{attFilingDataAndDocumentUploadPage.gotoCaseDetailsPage}"
					styleClass="buttonClass"
					rendered="#{attFilingDataAndDocumentUploadPage.renderReviewBtn}" title="#{bundle.reviewFiling}"/>
			</h:column>
		</h:form>


		<h:form>
			<h:outputText value="List of Uploaded Documents" styleClass="header" />
			<div class="grouping"><h:panelGrid columns="5" width="100%">
				<h:dataTable id="DATATABLE_documents" width="100%"
					value="#{attFilingDataAndDocumentUploadPage.uploadedDocumentList}"
					var="documents"
					columnClasses="dataTableColumnClass,dataTableColumnClass,dataTableColumnClass,dataTableColumnClass,dataTableColumnClass">
					<h:column rendered="#{(not documents.sentToAttorney)}">
						<f:facet name="header">
							<h:outputText value="Title" styleClass="subHeadingTextClass" />
						</f:facet>
						<h:commandLink value="#{documents.title}"
							action="#{attFilingDataAndDocumentUploadPage.viewFile}"
							styleClass="textFont75">
							<f:param name="document" value="#{documents}"
								binding="#{attFilingDataAndDocumentUploadPage.documentClicked}" />
						</h:commandLink>
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="" styleClass="subHeadingTextClass" />
						</f:facet>
						<h:commandLink value="Delete"
							action="#{attFilingDataAndDocumentUploadPage.deleteDocument}"
							styleClass="textFont75">
							<f:param name="document" value="#{documents}"
								binding="#{attFilingDataAndDocumentUploadPage.documentClicked}" />
						</h:commandLink>
					</h:column>




				</h:dataTable>
			</h:panelGrid></div>
		</h:form>
	</ui:define>
</ui:composition>
</html>


